-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[libc++] Make <map>
std::map
constexpr as part of P3372R3
#134330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[libc++] Make <map>
std::map
constexpr as part of P3372R3
#134330
Conversation
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
46d0bb9
to
9ea718f
Compare
…__value_type<int, int>')
…P3372-constexpr-map
01dc888
to
5c84f1f
Compare
Which may be due to This may get fixed by #161736
|
macos builds appear to be failing due to an unrelated issue: https://github.com/llvm/llvm-project/actions/runs/18238483208/job/51938026500?pr=134330
|
ff27195
to
29acf01
Compare
Fixes #128660
Depends on:
libcxx/include/__memory/pointer_traits.h
#157304std::__tree_node
construction #153908Summary:
Apply
_LIBCPP_CONSTEXPR_SINCE_CXX26
tomap
,__tree
,node-handle
,__libcpp_erase_if
,__lazy_synth_three_way_comparator
,__lazy_compare_result
,libcxx/include/__utility/try_key_extraction.h
Skip test
erase_if.pass.cpp
for GCC during constant evaluation. AFAICT this appears to be a g++ bug, as the test passes with clangDisable test for
node-handle::key()
during constant evaluation (CWG2514). It is annotated with a// FIXME
map.modifiers/try.emplace.pass.cpp
: Start using the previously unusedmv3
. (Should this be a separate patch?)Has a TODO for
multimap
and ohtersa.
libcxx/test/std/containers/associative/map/map.ops/contains.pass.cpp
b.
libcxx/test/std/containers/associative/map/map.ops/contains_transparent.pass.cpp
a.
libcxx/test/std/containers/container.node/node_handle.pass.cpp
Fix typo in-> [NFC][libc++] Fix typo inlibcxx/include/__memory/pointer_traits.h
libcxx/include/__memory/pointer_traits.h
#157304pair<const MoveOnly, ...>
a.
move_assign.pass.cpp
b.
move_alloc.pass.cpp
c. Fails to compile if
static_assert(test());
is called in the test filed. Has a
// FIXME
with commented codeChangeThis became -> [libc++] Remove UB from__tree_node
to construct it's__node_value_type
during construction to avoid the:note: member call on object outside its lifetime is not allowed in a constant expression
issue.std::__tree_node
construction #153908